<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><!-- InstanceBegin template="/Templates/tweeningparameter.dwt" codeOutsideHTMLIsLocked="false" -->
<head>
<META http-equiv="Content-Type" content="text/html; charset=">
<!-- InstanceBeginEditable name="doctitle" -->
<title>Tweener Documentation and Language Reference</title>
<!-- InstanceEndEditable -->
<link href="../style.css" rel="stylesheet" type="text/css">
<link href="../print.css" rel="stylesheet" type="text/css" media="print">
<!-- InstanceBeginEditable name="head" --><!-- InstanceEndEditable --><!-- InstanceParam name="OptionalSeeAlso" type="boolean" value="true" --><!-- InstanceParam name="OptionalNotes" type="boolean" value="true" -->
</head>
<body>
<div id="header">
  <p>Tweener Documentation</p>
  <h1><!-- InstanceBeginEditable name="PageType" -->Reference &raquo; Tweening Parameters<!-- InstanceEndEditable --></h1>
</div>
<div class="detailBody">
  <h1><!-- InstanceBeginEditable name="ParameterName" -->onComplete<!-- InstanceEndEditable --></h1>
  <h4>Availability</h4>
  <!-- InstanceBeginEditable name="DetailAvailability" -->
  <p>AS2 and AS3.</p>
  <!-- InstanceEndEditable -->
  <h4>Usage</h4>
  <pre><!-- InstanceBeginEditable name="DetailUsage" -->... onComplete:value<!-- InstanceEndEditable -->, ...</pre>
  <h4>Parameters</h4>
  <!-- InstanceBeginEditable name="DetailParameters" -->
  <p><code>value</code>:Function &mdash; A function that is called immediately after a tweening is completed. It is called once regardless of the number of properties involved on the tweening. The function scope (in which the event is executed) is the target object itself, unless specified by the <code><a href="onCompleteScope.html">onCompleteScope</a></code> parameter.</p>
  <!-- InstanceEndEditable -->
  <h4>Examples</h4>
  <!-- InstanceBeginEditable name="DetailExamples" -->
  <pre>// Fades a movieclip out, then automatically makes it invisible (AS2)
hideWay = function() {
	this._visible = false
};
myMovieClip._visible = true;
myMovieClip._alpha = 100;
Tweener.addTween(myMovieClip, {_alpha:0, time:1, delay:4, onComplete:hideAway});</pre>
  <pre>// Similarly, with an anonymous function
myMovieClip._visible = true;
myMovieClip._alpha = 100;
Tweener.addTween(myMovieClip, {_alpha:0, time:1, delay:4, onComplete:function() { this._visible = false; }});</pre>
  <!-- InstanceEndEditable -->
  
  <h4><a name="notes">Notes</a></h4>
  <!-- InstanceBeginEditable name="DetailsNotes" -->
  <p>The reference passed to this property is a reference to the function <strong>only</strong>. This roughly means you do <strong>not</strong> use any kind of parenthesis or parameters when passing the function you wish to call - you need to use the <a href="onCompleteParams.html">onCompleteParams</a> parameter for that. See the <a href="onStart.html#notes">onStart</a> method notes for more information and examples. </p>
  <!-- InstanceEndEditable -->
  
  <h4>See also</h4>
  <!-- InstanceBeginEditable name="DetailsSeeAlso" -->
  <p><a href="onStart.html">onStart</a>, <a href="onUpdate.html">onUpdate</a>, <a href="onCompleteParams.html">onCompleteParams</a>, <a href="onCompleteScope.html">onCompleteScope</a>,  <a href="onOverwrite.html">onOverwrite</a></p>
  <!-- InstanceEndEditable --></div>
</body>
<!-- -->
<!-- InstanceEnd --></html>
